var data =
[{
        "code": "6101",
        "name": "西安市",
        "children": [{
            "code": "610102",
            "name": "新城区",
            "children": [{
                "code": "610102001",
                "name": "西一路街道"
            }, {
                "code": "610102002",
                "name": "长乐中路街道"
            }, {
                "code": "610102003",
                "name": "中山门街道"
            }, {
                "code": "610102004",
                "name": "韩森寨街道"
            }, {
                "code": "610102005",
                "name": "解放门街道"
            }, {
                "code": "610102006",
                "name": "自强路街道"
            }, {
                "code": "610102007",
                "name": "太华路街道"
            }, {
                "code": "610102008",
                "name": "长乐西路街道"
            }, {
                "code": "610102009",
                "name": "胡家庙街道"
            }]
        }, {
            "code": "610103",
            "name": "碑林区",
            "children": [{
                "code": "610103001",
                "name": "南院门街道"
            }, {
                "code": "610103002",
                "name": "柏树林街道"
            }, {
                "code": "610103003",
                "name": "长乐坊街道"
            }, {
                "code": "610103004",
                "name": "东关南街街道"
            }, {
                "code": "610103005",
                "name": "太乙路街道"
            }, {
                "code": "610103006",
                "name": "文艺路街道"
            }, {
                "code": "610103007",
                "name": "长安路街道"
            }, {
                "code": "610103008",
                "name": "张家村街道"
            }]
        }, {
            "code": "610104",
            "name": "莲湖区",
            "children": [{
                "code": "610104001",
                "name": "青年路街道"
            }, {
                "code": "610104002",
                "name": "北院门街道"
            }, {
                "code": "610104003",
                "name": "北关街道"
            }, {
                "code": "610104004",
                "name": "红庙坡街道"
            }, {
                "code": "610104005",
                "name": "环城西路街道"
            }, {
                "code": "610104006",
                "name": "西关街道"
            }, {
                "code": "610104007",
                "name": "土门街道"
            }, {
                "code": "610104008",
                "name": "桃园路街道"
            }, {
                "code": "610104009",
                "name": "枣园街道"
            }]
        }, {
            "code": "610111",
            "name": "灞桥区",
            "children": [{
                "code": "610111001",
                "name": "纺织城街道"
            }, {
                "code": "610111002",
                "name": "十里铺街道"
            }, {
                "code": "610111003",
                "name": "红旗街道"
            }, {
                "code": "610111004",
                "name": "席王街道"
            }, {
                "code": "610111005",
                "name": "洪庆街道"
            }, {
                "code": "610111006",
                "name": "狄寨街道"
            }, {
                "code": "610111007",
                "name": "灞桥街道"
            }, {
                "code": "610111008",
                "name": "新筑街道"
            }, {
                "code": "610111009",
                "name": "新合街道"
            }]
        }, {
            "code": "610112",
            "name": "未央区",
            "children": [{
                "code": "610112001",
                "name": "张家堡街道"
            }, {
                "code": "610112002",
                "name": "三桥街道"
            }, {
                "code": "610112003",
                "name": "辛家庙街道"
            }, {
                "code": "610112004",
                "name": "徐家湾街道"
            }, {
                "code": "610112005",
                "name": "大明宫街道"
            }, {
                "code": "610112006",
                "name": "谭家街道"
            }, {
                "code": "610112007",
                "name": "草滩街道"
            }, {
                "code": "610112008",
                "name": "六村堡街道"
            }, {
                "code": "610112009",
                "name": "未央宫街道"
            }, {
                "code": "610112010",
                "name": "汉城街道"
            }, {
                "code": "610112011",
                "name": "未央湖街道"
            }, {
                "code": "610112012",
                "name": "建章路街道"
            }]
        }, {
            "code": "610113",
            "name": "雁塔区",
            "children": [{
                "code": "610113001",
                "name": "小寨路街道"
            }, {
                "code": "610113002",
                "name": "大雁塔街道"
            }, {
                "code": "610113003",
                "name": "长延堡街道"
            }, {
                "code": "610113004",
                "name": "电子城街道"
            }, {
                "code": "610113005",
                "name": "等驾坡街道"
            }, {
                "code": "610113006",
                "name": "鱼化寨街道"
            }, {
                "code": "610113007",
                "name": "丈八沟街道"
            }, {
                "code": "610113008",
                "name": "曲江街道"
            }]
        }, {
            "code": "610114",
            "name": "阎良区",
            "children": [{
                "code": "610114001",
                "name": "凤凰路街道"
            }, {
                "code": "610114002",
                "name": "新华路街道"
            }, {
                "code": "610114003",
                "name": "振兴街道"
            }, {
                "code": "610114004",
                "name": "新兴街道"
            }, {
                "code": "610114005",
                "name": "北屯街道"
            }, {
                "code": "610114100",
                "name": "武屯镇"
            }, {
                "code": "610114101",
                "name": "关山镇"
            }]
        }, {
            "code": "610115",
            "name": "临潼区",
            "children": [{
                "code": "610115001",
                "name": "骊山街道"
            }, {
                "code": "610115002",
                "name": "秦陵街道"
            }, {
                "code": "610115003",
                "name": "新丰街道"
            }, {
                "code": "610115004",
                "name": "代王街道"
            }, {
                "code": "610115005",
                "name": "斜口街道"
            }, {
                "code": "610115006",
                "name": "行者街道"
            }, {
                "code": "610115007",
                "name": "零口街道"
            }, {
                "code": "610115008",
                "name": "相桥街道"
            }, {
                "code": "610115009",
                "name": "雨金街道"
            }, {
                "code": "610115010",
                "name": "新市街道"
            }, {
                "code": "610115011",
                "name": "徐杨街道"
            }, {
                "code": "610115012",
                "name": "西泉街道"
            }, {
                "code": "610115013",
                "name": "栎阳街道"
            }, {
                "code": "610115014",
                "name": "马额街道"
            }, {
                "code": "610115015",
                "name": "何寨街道"
            }, {
                "code": "610115016",
                "name": "交口街道"
            }, {
                "code": "610115017",
                "name": "油槐街道"
            }, {
                "code": "610115018",
                "name": "北田街道"
            }, {
                "code": "610115019",
                "name": "铁炉街道"
            }, {
                "code": "610115020",
                "name": "任留街道"
            }, {
                "code": "610115021",
                "name": "穆寨街道"
            }, {
                "code": "610115022",
                "name": "小金街道"
            }, {
                "code": "610115023",
                "name": "仁宗街道"
            }]
        }, {
            "code": "610116",
            "name": "长安区",
            "children": [{
                "code": "610116001",
                "name": "韦曲街道"
            }, {
                "code": "610116002",
                "name": "郭杜街道"
            }, {
                "code": "610116003",
                "name": "滦镇街道"
            }, {
                "code": "610116004",
                "name": "引镇街道"
            }, {
                "code": "610116005",
                "name": "王寺街道"
            }, {
                "code": "610116006",
                "name": "马王街道"
            }, {
                "code": "610116007",
                "name": "太乙宫街道"
            }, {
                "code": "610116008",
                "name": "东大街道"
            }, {
                "code": "610116009",
                "name": "子午街道"
            }, {
                "code": "610116010",
                "name": "斗门街道"
            }, {
                "code": "610116011",
                "name": "细柳街道"
            }, {
                "code": "610116012",
                "name": "杜曲街道"
            }, {
                "code": "610116013",
                "name": "大兆街道"
            }, {
                "code": "610116014",
                "name": "黄良街道"
            }, {
                "code": "610116015",
                "name": "兴隆街道"
            }, {
                "code": "610116016",
                "name": "王曲街道"
            }, {
                "code": "610116017",
                "name": "鸣犊街道"
            }, {
                "code": "610116018",
                "name": "王莽街道"
            }, {
                "code": "610116019",
                "name": "五台街道"
            }, {
                "code": "610116020",
                "name": "高桥街道"
            }, {
                "code": "610116021",
                "name": "五星街道"
            }, {
                "code": "610116022",
                "name": "灵沼街道"
            }, {
                "code": "610116023",
                "name": "杨庄街道"
            }, {
                "code": "610116024",
                "name": "砲里街道"
            }, {
                "code": "610116025",
                "name": "魏寨街道"
            }]
        }, {
            "code": "610117",
            "name": "高陵区",
            "children": [{
                "code": "610117001",
                "name": "鹿苑街道"
            }, {
                "code": "610117002",
                "name": "泾渭街道"
            }, {
                "code": "610117003",
                "name": "崇皇街道"
            }, {
                "code": "610117004",
                "name": "姬家街道"
            }, {
                "code": "610117101",
                "name": "通远镇"
            }, {
                "code": "610117102",
                "name": "耿镇"
            }, {
                "code": "610117106",
                "name": "张卜镇"
            }]
        }, {
            "code": "610122",
            "name": "蓝田县",
            "children": [{
                "code": "610122001",
                "name": "蓝关街道"
            }, {
                "code": "610122101",
                "name": "洩湖镇"
            }, {
                "code": "610122102",
                "name": "华胥镇"
            }, {
                "code": "610122103",
                "name": "前卫镇"
            }, {
                "code": "610122104",
                "name": "汤峪镇"
            }, {
                "code": "610122105",
                "name": "焦岱镇"
            }, {
                "code": "610122106",
                "name": "玉山镇"
            }, {
                "code": "610122107",
                "name": "三里镇"
            }, {
                "code": "610122108",
                "name": "普化镇"
            }, {
                "code": "610122109",
                "name": "葛牌镇"
            }, {
                "code": "610122110",
                "name": "灞源镇"
            }, {
                "code": "610122111",
                "name": "九间房镇"
            }, {
                "code": "610122112",
                "name": "蓝桥镇"
            }, {
                "code": "610122113",
                "name": "辋川镇"
            }, {
                "code": "610122115",
                "name": "厚镇"
            }, {
                "code": "610122116",
                "name": "三官庙镇"
            }, {
                "code": "610122118",
                "name": "安村镇"
            }, {
                "code": "610122119",
                "name": "孟村镇"
            }, {
                "code": "610122120",
                "name": "小寨镇"
            }]
        }, {
            "code": "610124",
            "name": "周至县",
            "children": [{
                "code": "610124001",
                "name": "二曲街道"
            }, {
                "code": "610124101",
                "name": "哑柏镇"
            }, {
                "code": "610124102",
                "name": "终南镇"
            }, {
                "code": "610124103",
                "name": "马召镇"
            }, {
                "code": "610124104",
                "name": "集贤镇"
            }, {
                "code": "610124105",
                "name": "楼观镇"
            }, {
                "code": "610124106",
                "name": "尚村镇"
            }, {
                "code": "610124107",
                "name": "广济镇"
            }, {
                "code": "610124108",
                "name": "厚畛子镇"
            }, {
                "code": "610124109",
                "name": "青化镇"
            }, {
                "code": "610124110",
                "name": "竹峪镇"
            }, {
                "code": "610124111",
                "name": "翠峰镇"
            }, {
                "code": "610124112",
                "name": "四屯镇"
            }, {
                "code": "610124115",
                "name": "司竹镇"
            }, {
                "code": "610124116",
                "name": "九峰镇"
            }, {
                "code": "610124117",
                "name": "富仁镇"
            }, {
                "code": "610124118",
                "name": "骆峪镇"
            }, {
                "code": "610124119",
                "name": "陈河镇"
            }, {
                "code": "610124120",
                "name": "板房子镇"
            }, {
                "code": "610124121",
                "name": "王家河镇"
            }]
        }, {
            "code": "610125",
            "name": "鄠邑区",
            "children": [{
                "code": "610125001",
                "name": "甘亭街道办"
            }, {
                "code": "610125101",
                "name": "余下镇"
            }, {
                "code": "610125102",
                "name": "祖庵镇"
            }, {
                "code": "610125103",
                "name": "秦渡镇"
            }, {
                "code": "610125104",
                "name": "大王镇"
            }, {
                "code": "610125105",
                "name": "草堂镇"
            }, {
                "code": "610125106",
                "name": "蒋村镇"
            }, {
                "code": "610125107",
                "name": "庞光镇"
            }, {
                "code": "610125108",
                "name": "涝店镇"
            }, {
                "code": "610125109",
                "name": "甘河镇"
            }, {
                "code": "610125110",
                "name": "石井镇"
            }, {
                "code": "610125111",
                "name": "玉蝉镇"
            }, {
                "code": "610125112",
                "name": "五竹镇"
            }, {
                "code": "610125114",
                "name": "渭丰镇"
            }]
        }]
    }, {
        "code": "6102",
        "name": "铜川市",
        "children": [{
            "code": "610202",
            "name": "王益区",
            "children": [{
                "code": "610202001",
                "name": "七一路街道"
            }, {
                "code": "610202002",
                "name": "红旗街道"
            }, {
                "code": "610202003",
                "name": "桃园街道"
            }, {
                "code": "610202004",
                "name": "青年路街道"
            }, {
                "code": "610202005",
                "name": "王家河街道"
            }, {
                "code": "610202006",
                "name": "王益街道"
            }, {
                "code": "610202100",
                "name": "黄堡镇"
            }]
        }, {
            "code": "610203",
            "name": "印台区",
            "children": [{
                "code": "610203001",
                "name": "城关街道"
            }, {
                "code": "610203002",
                "name": "三里洞街道"
            }, {
                "code": "610203003",
                "name": "王石凹街道"
            }, {
                "code": "610203004",
                "name": "印台街道"
            }, {
                "code": "610203100",
                "name": "陈炉镇"
            }, {
                "code": "610203101",
                "name": "红土镇"
            }, {
                "code": "610203102",
                "name": "广阳镇"
            }, {
                "code": "610203104",
                "name": "金锁关镇"
            }, {
                "code": "610203106",
                "name": "阿庄镇"
            }]
        }, {
            "code": "610204",
            "name": "耀州区",
            "children": [{
                "code": "610204001",
                "name": "永安路街道"
            }, {
                "code": "610204002",
                "name": "天宝路街道"
            }, {
                "code": "610204003",
                "name": "咸丰路街道"
            }, {
                "code": "610204004",
                "name": "正阳路街道"
            }, {
                "code": "610204005",
                "name": "锦阳路街道"
            }, {
                "code": "610204006",
                "name": "坡头街道"
            }, {
                "code": "610204101",
                "name": "董家河镇"
            }, {
                "code": "610204102",
                "name": "庙湾镇"
            }, {
                "code": "610204103",
                "name": "瑶曲镇"
            }, {
                "code": "610204104",
                "name": "照金镇"
            }, {
                "code": "610204107",
                "name": "小丘镇"
            }, {
                "code": "610204108",
                "name": "孙塬镇"
            }, {
                "code": "610204109",
                "name": "关庄镇"
            }, {
                "code": "610204111",
                "name": "石柱镇"
            }]
        }, {
            "code": "610222",
            "name": "宜君县",
            "children": [{
                "code": "610222001",
                "name": "宜阳街道"
            }, {
                "code": "610222101",
                "name": "彭镇"
            }, {
                "code": "610222102",
                "name": "五里镇"
            }, {
                "code": "610222103",
                "name": "太安镇"
            }, {
                "code": "610222104",
                "name": "棋盘镇"
            }, {
                "code": "610222105",
                "name": "尧生镇"
            }, {
                "code": "610222106",
                "name": "哭泉镇"
            }, {
                "code": "610222201",
                "name": "云梦乡"
            }]
        }]
    }, {
        "code": "6103",
        "name": "宝鸡市",
        "children": [{
            "code": "610302",
            "name": "渭滨区",
            "children": [{
                "code": "610302001",
                "name": "金陵街道"
            }, {
                "code": "610302002",
                "name": "经二路街道"
            }, {
                "code": "610302003",
                "name": "清姜街道"
            }, {
                "code": "610302004",
                "name": "姜谭街道"
            }, {
                "code": "610302005",
                "name": "桥南街道"
            }, {
                "code": "610302100",
                "name": "马营镇"
            }, {
                "code": "610302101",
                "name": "石鼓镇"
            }, {
                "code": "610302102",
                "name": "神农镇"
            }, {
                "code": "610302103",
                "name": "高家镇"
            }, {
                "code": "610302104",
                "name": "八鱼镇"
            }]
        }, {
            "code": "610303",
            "name": "金台区",
            "children": [{
                "code": "610303001",
                "name": "中山东路街道"
            }, {
                "code": "610303002",
                "name": "西关街道"
            }, {
                "code": "610303003",
                "name": "中山西路街道"
            }, {
                "code": "610303004",
                "name": "群众路街道"
            }, {
                "code": "610303006",
                "name": "东风路街道"
            }, {
                "code": "610303007",
                "name": "十里铺街道"
            }, {
                "code": "610303008",
                "name": "卧龙寺街道"
            }, {
                "code": "610303100",
                "name": "陈仓镇"
            }, {
                "code": "610303101",
                "name": "蟠龙镇"
            }, {
                "code": "610303102",
                "name": "金河镇"
            }, {
                "code": "610303103",
                "name": "硖石镇"
            }]
        }, {
            "code": "610304",
            "name": "陈仓区",
            "children": [{
                "code": "610304001",
                "name": "虢镇街道"
            }, {
                "code": "610304002",
                "name": "东关街道"
            }, {
                "code": "610304003",
                "name": "千渭街道"
            }, {
                "code": "610304101",
                "name": "阳平镇"
            }, {
                "code": "610304102",
                "name": "千河镇"
            }, {
                "code": "610304103",
                "name": "磻溪镇"
            }, {
                "code": "610304104",
                "name": "天王镇"
            }, {
                "code": "610304105",
                "name": "慕仪镇"
            }, {
                "code": "610304106",
                "name": "周原镇"
            }, {
                "code": "610304107",
                "name": "贾村镇"
            }, {
                "code": "610304109",
                "name": "县功镇"
            }, {
                "code": "610304110",
                "name": "新街镇"
            }, {
                "code": "610304111",
                "name": "坪头镇"
            }, {
                "code": "610304112",
                "name": "香泉镇"
            }, {
                "code": "610304113",
                "name": "赤沙镇"
            }, {
                "code": "610304114",
                "name": "拓石镇"
            }, {
                "code": "610304115",
                "name": "凤阁岭镇"
            }, {
                "code": "610304116",
                "name": "钓渭镇"
            }]
        }, {
            "code": "610322",
            "name": "凤翔县",
            "children": [{
                "code": "610322100",
                "name": "城关镇"
            }, {
                "code": "610322101",
                "name": "虢王镇"
            }, {
                "code": "610322102",
                "name": "彪角镇"
            }, {
                "code": "610322103",
                "name": "横水镇"
            }, {
                "code": "610322104",
                "name": "田家庄镇"
            }, {
                "code": "610322105",
                "name": "糜杆桥镇"
            }, {
                "code": "610322107",
                "name": "南指挥镇"
            }, {
                "code": "610322108",
                "name": "陈村镇"
            }, {
                "code": "610322109",
                "name": "长青镇"
            }, {
                "code": "610322110",
                "name": "柳林镇"
            }, {
                "code": "610322111",
                "name": "姚家沟镇"
            }, {
                "code": "610322112",
                "name": "范家寨镇"
            }]
        }, {
            "code": "610323",
            "name": "岐山县",
            "children": [{
                "code": "610323100",
                "name": "凤鸣镇"
            }, {
                "code": "610323101",
                "name": "蔡家坡镇"
            }, {
                "code": "610323103",
                "name": "益店镇"
            }, {
                "code": "610323104",
                "name": "蒲村镇"
            }, {
                "code": "610323106",
                "name": "青化镇"
            }, {
                "code": "610323107",
                "name": "枣林镇"
            }, {
                "code": "610323108",
                "name": "雍川镇"
            }, {
                "code": "610323111",
                "name": "故郡镇"
            }, {
                "code": "610323112",
                "name": "京当镇"
            }]
        }, {
            "code": "610324",
            "name": "扶风县",
            "children": [{
                "code": "610324001",
                "name": "城关街道"
            }, {
                "code": "610324101",
                "name": "天度镇"
            }, {
                "code": "610324102",
                "name": "午井镇"
            }, {
                "code": "610324103",
                "name": "绛帐镇"
            }, {
                "code": "610324104",
                "name": "段家镇"
            }, {
                "code": "610324105",
                "name": "杏林镇"
            }, {
                "code": "610324106",
                "name": "召公镇"
            }, {
                "code": "610324107",
                "name": "法门镇"
            }]
        }, {
            "code": "610326",
            "name": "眉县",
            "children": [{
                "code": "610326001",
                "name": "首善街道"
            }, {
                "code": "610326101",
                "name": "横渠镇"
            }, {
                "code": "610326102",
                "name": "槐芽镇"
            }, {
                "code": "610326103",
                "name": "汤峪镇"
            }, {
                "code": "610326104",
                "name": "常兴镇"
            }, {
                "code": "610326105",
                "name": "金渠镇"
            }, {
                "code": "610326106",
                "name": "营头镇"
            }, {
                "code": "610326107",
                "name": "齐镇"
            }, {
                "code": "610326400",
                "name": "陕西省太白山旅游区"
            }, {
                "code": "610326401",
                "name": "红河谷森林公园"
            }]
        }, {
            "code": "610327",
            "name": "陇县",
            "children": [{
                "code": "610327100",
                "name": "城关镇"
            }, {
                "code": "610327101",
                "name": "东风镇"
            }, {
                "code": "610327102",
                "name": "八渡镇"
            }, {
                "code": "610327104",
                "name": "东南镇"
            }, {
                "code": "610327106",
                "name": "温水镇"
            }, {
                "code": "610327107",
                "name": "天成镇"
            }, {
                "code": "610327108",
                "name": "曹家湾镇"
            }, {
                "code": "610327109",
                "name": "固关镇"
            }, {
                "code": "610327112",
                "name": "河北镇"
            }, {
                "code": "610327113",
                "name": "新集川镇"
            }]
        }, {
            "code": "610328",
            "name": "千阳县",
            "children": [{
                "code": "610328100",
                "name": "城关镇"
            }, {
                "code": "610328101",
                "name": "崔家头镇"
            }, {
                "code": "610328102",
                "name": "南寨镇"
            }, {
                "code": "610328103",
                "name": "张家塬镇"
            }, {
                "code": "610328104",
                "name": "水沟镇"
            }, {
                "code": "610328105",
                "name": "草碧镇"
            }, {
                "code": "610328107",
                "name": "高崖镇"
            }]
        }, {
            "code": "610329",
            "name": "麟游县",
            "children": [{
                "code": "610329100",
                "name": "九成宫镇"
            }, {
                "code": "610329101",
                "name": "崔木镇"
            }, {
                "code": "610329102",
                "name": "招贤镇"
            }, {
                "code": "610329103",
                "name": "两亭镇"
            }, {
                "code": "610329105",
                "name": "常丰镇"
            }, {
                "code": "610329106",
                "name": "丈八镇"
            }, {
                "code": "610329107",
                "name": "酒房镇"
            }]
        }, {
            "code": "610330",
            "name": "凤县",
            "children": [{
                "code": "610330100",
                "name": "双石铺镇"
            }, {
                "code": "610330101",
                "name": "凤州镇"
            }, {
                "code": "610330102",
                "name": "黄牛铺镇"
            }, {
                "code": "610330103",
                "name": "红花铺镇"
            }, {
                "code": "610330104",
                "name": "河口镇"
            }, {
                "code": "610330105",
                "name": "唐藏镇"
            }, {
                "code": "610330106",
                "name": "平木镇"
            }, {
                "code": "610330107",
                "name": "坪坎镇"
            }, {
                "code": "610330110",
                "name": "留凤关镇"
            }, {
                "code": "610330400",
                "name": "马头滩林业局"
            }, {
                "code": "610330401",
                "name": "辛家山林业场"
            }]
        }, {
            "code": "610331",
            "name": "太白县",
            "children": [{
                "code": "610331100",
                "name": "咀头镇"
            }, {
                "code": "610331101",
                "name": "桃川镇"
            }, {
                "code": "610331102",
                "name": "鹦鸽镇"
            }, {
                "code": "610331103",
                "name": "靖口镇"
            }, {
                "code": "610331104",
                "name": "太白河镇"
            }, {
                "code": "610331105",
                "name": "黄柏塬镇"
            }, {
                "code": "610331106",
                "name": "王家堎镇"
            }]
        }]
    }, {
        "code": "6104",
        "name": "咸阳市",
        "children": [{
            "code": "610402",
            "name": "秦都区",
            "children": [{
                "code": "610402001",
                "name": "人民路街道"
            }, {
                "code": "610402002",
                "name": "西兰路街道"
            }, {
                "code": "610402003",
                "name": "吴家堡街道"
            }, {
                "code": "610402004",
                "name": "渭阳西路街道"
            }, {
                "code": "610402005",
                "name": "陈杨寨街道"
            }, {
                "code": "610402006",
                "name": "古渡街道"
            }, {
                "code": "610402007",
                "name": "沣东街道"
            }, {
                "code": "610402008",
                "name": "钓台街道"
            }, {
                "code": "610402009",
                "name": "马泉街道"
            }, {
                "code": "610402010",
                "name": "渭滨街道"
            }, {
                "code": "610402011",
                "name": "双照街道"
            }, {
                "code": "610402012",
                "name": "马庄街道"
            }]
        }, {
            "code": "610404",
            "name": "渭城区",
            "children": [{
                "code": "610404001",
                "name": "中山街道"
            }, {
                "code": "610404002",
                "name": "文汇路街道"
            }, {
                "code": "610404003",
                "name": "新兴街道"
            }, {
                "code": "610404004",
                "name": "渭阳街道"
            }, {
                "code": "610404005",
                "name": "渭城街道"
            }, {
                "code": "610404006",
                "name": "窑店街道"
            }, {
                "code": "610404007",
                "name": "正阳街道"
            }, {
                "code": "610404008",
                "name": "周陵街道"
            }, {
                "code": "610404009",
                "name": "底张街道"
            }, {
                "code": "610404010",
                "name": "北杜街道"
            }]
        }, {
            "code": "610422",
            "name": "三原县",
            "children": [{
                "code": "610422001",
                "name": "城关街道"
            }, {
                "code": "610422102",
                "name": "陂西镇"
            }, {
                "code": "610422103",
                "name": "独李镇"
            }, {
                "code": "610422104",
                "name": "大程镇"
            }, {
                "code": "610422105",
                "name": "西阳镇"
            }, {
                "code": "610422106",
                "name": "鲁桥镇"
            }, {
                "code": "610422107",
                "name": "陵前镇"
            }, {
                "code": "610422109",
                "name": "新兴镇"
            }, {
                "code": "610422110",
                "name": "嵯峨镇"
            }, {
                "code": "610422111",
                "name": "渠岸镇"
            }]
        }, {
            "code": "610423",
            "name": "泾阳县",
            "children": [{
                "code": "610423001",
                "name": "泾干街道"
            }, {
                "code": "610423101",
                "name": "永乐镇"
            }, {
                "code": "610423102",
                "name": "云阳镇"
            }, {
                "code": "610423103",
                "name": "桥底镇"
            }, {
                "code": "610423104",
                "name": "王桥镇"
            }, {
                "code": "610423105",
                "name": "口镇"
            }, {
                "code": "610423107",
                "name": "三渠镇"
            }, {
                "code": "610423108",
                "name": "高庄镇"
            }, {
                "code": "610423111",
                "name": "太平镇"
            }, {
                "code": "610423112",
                "name": "崇文镇"
            }, {
                "code": "610423113",
                "name": "安吴镇"
            }, {
                "code": "610423114",
                "name": "兴隆镇"
            }, {
                "code": "610423115",
                "name": "中张镇"
            }]
        }, {
            "code": "610424",
            "name": "乾县",
            "children": [{
                "code": "610424001",
                "name": "城关街道"
            }, {
                "code": "610424101",
                "name": "薛录镇"
            }, {
                "code": "610424102",
                "name": "梁村镇"
            }, {
                "code": "610424103",
                "name": "临平镇"
            }, {
                "code": "610424104",
                "name": "姜村镇"
            }, {
                "code": "610424105",
                "name": "王村镇"
            }, {
                "code": "610424106",
                "name": "马连镇"
            }, {
                "code": "610424107",
                "name": "阳峪镇"
            }, {
                "code": "610424108",
                "name": "峰阳镇"
            }, {
                "code": "610424109",
                "name": "注泔镇"
            }, {
                "code": "610424110",
                "name": "灵源镇"
            }, {
                "code": "610424111",
                "name": "阳洪镇"
            }, {
                "code": "610424112",
                "name": "梁山镇"
            }, {
                "code": "610424113",
                "name": "周城镇"
            }, {
                "code": "610424114",
                "name": "新阳镇"
            }, {
                "code": "610424115",
                "name": "大杨镇"
            }]
        }, {
            "code": "610425",
            "name": "礼泉县",
            "children": [{
                "code": "610425001",
                "name": "城关街道"
            }, {
                "code": "610425101",
                "name": "史德镇"
            }, {
                "code": "610425102",
                "name": "西张堡镇"
            }, {
                "code": "610425103",
                "name": "阡东镇"
            }, {
                "code": "610425104",
                "name": "烽火镇"
            }, {
                "code": "610425105",
                "name": "烟霞镇"
            }, {
                "code": "610425106",
                "name": "赵镇"
            }, {
                "code": "610425108",
                "name": "叱干镇"
            }, {
                "code": "610425109",
                "name": "南坊镇"
            }, {
                "code": "610425110",
                "name": "石潭镇"
            }, {
                "code": "610425111",
                "name": "昭陵镇"
            }, {
                "code": "610425112",
                "name": "骏马镇"
            }]
        }, {
            "code": "610426",
            "name": "永寿县",
            "children": [{
                "code": "610426001",
                "name": "监军街道"
            }, {
                "code": "610426101",
                "name": "店头镇"
            }, {
                "code": "610426102",
                "name": "常宁镇"
            }, {
                "code": "610426104",
                "name": "甘井镇"
            }, {
                "code": "610426105",
                "name": "马坊镇"
            }, {
                "code": "610426108",
                "name": "渠子镇"
            }, {
                "code": "610426110",
                "name": "永平镇"
            }]
        }, {
            "code": "610427",
            "name": "彬县",
            "children": [{
                "code": "610427001",
                "name": "城关街道"
            }, {
                "code": "610427101",
                "name": "北极镇"
            }, {
                "code": "610427102",
                "name": "新民镇"
            }, {
                "code": "610427103",
                "name": "龙高镇"
            }, {
                "code": "610427105",
                "name": "永乐镇"
            }, {
                "code": "610427106",
                "name": "义门镇"
            }, {
                "code": "610427107",
                "name": "水口镇"
            }, {
                "code": "610427108",
                "name": "韩家镇"
            }, {
                "code": "610427109",
                "name": "太峪镇"
            }]
        }, {
            "code": "610428",
            "name": "长武县",
            "children": [{
                "code": "610428001",
                "name": "昭仁街道"
            }, {
                "code": "610428101",
                "name": "相公镇"
            }, {
                "code": "610428102",
                "name": "巨家镇"
            }, {
                "code": "610428103",
                "name": "丁家镇"
            }, {
                "code": "610428104",
                "name": "洪家镇"
            }, {
                "code": "610428105",
                "name": "亭口镇"
            }, {
                "code": "610428106",
                "name": "彭公镇"
            }, {
                "code": "610428108",
                "name": "枣元镇"
            }]
        }, {
            "code": "610429",
            "name": "旬邑县",
            "children": [{
                "code": "610429001",
                "name": "城关街道"
            }, {
                "code": "610429101",
                "name": "土桥镇"
            }, {
                "code": "610429102",
                "name": "职田镇"
            }, {
                "code": "610429103",
                "name": "张洪镇"
            }, {
                "code": "610429104",
                "name": "太村镇"
            }, {
                "code": "610429105",
                "name": "郑家镇"
            }, {
                "code": "610429106",
                "name": "湫坡头镇"
            }, {
                "code": "610429107",
                "name": "底庙镇"
            }, {
                "code": "610429109",
                "name": "马栏镇"
            }, {
                "code": "610429110",
                "name": "清塬镇"
            }]
        }, {
            "code": "610430",
            "name": "淳化县",
            "children": [{
                "code": "610430001",
                "name": "城关街道"
            }, {
                "code": "610430101",
                "name": "官庄镇"
            }, {
                "code": "610430103",
                "name": "方里镇"
            }, {
                "code": "610430104",
                "name": "润镇"
            }, {
                "code": "610430105",
                "name": "车坞镇"
            }, {
                "code": "610430106",
                "name": "铁王镇"
            }, {
                "code": "610430107",
                "name": "石桥镇"
            }, {
                "code": "610430109",
                "name": "十里塬镇"
            }]
        }, {
            "code": "610431",
            "name": "武功县",
            "children": [{
                "code": "610431001",
                "name": "普集街道"
            }, {
                "code": "610431101",
                "name": "苏坊镇"
            }, {
                "code": "610431102",
                "name": "武功镇"
            }, {
                "code": "610431103",
                "name": "游风镇"
            }, {
                "code": "610431104",
                "name": "贞元镇"
            }, {
                "code": "610431105",
                "name": "长宁镇"
            }, {
                "code": "610431106",
                "name": "小村镇"
            }, {
                "code": "610431107",
                "name": "大庄镇"
            }]
        }, {
            "code": "610481",
            "name": "兴平市",
            "children": [{
                "code": "610481001",
                "name": "东城街道"
            }, {
                "code": "610481002",
                "name": "西城街道"
            }, {
                "code": "610481003",
                "name": "店张街道"
            }, {
                "code": "610481004",
                "name": "西吴街道"
            }, {
                "code": "610481005",
                "name": "马嵬街道"
            }, {
                "code": "610481101",
                "name": "赵村镇"
            }, {
                "code": "610481102",
                "name": "桑镇"
            }, {
                "code": "610481104",
                "name": "南市镇"
            }, {
                "code": "610481105",
                "name": "庄头镇"
            }, {
                "code": "610481106",
                "name": "南位镇"
            }, {
                "code": "610481107",
                "name": "阜寨镇"
            }, {
                "code": "610481108",
                "name": "丰仪镇"
            }, {
                "code": "610481109",
                "name": "汤坊镇"
            }]
        }, {
            "code": "610X03",
            "name": "杨凌示范区",
            "children": [{
                "code": "610X03001",
                "name": "杨凌街道"
            }, {
                "code": "610X03002",
                "name": "李台街道"
            }, {
                "code": "610X03003",
                "name": "大寨街道"
            }, {
                "code": "610X03100",
                "name": "五泉镇"
            }, {
                "code": "610X03102",
                "name": "揉谷镇"
            }]
        }]
    }, {
        "code": "6105",
        "name": "渭南市",
        "children": [{
            "code": "610502",
            "name": "临渭区",
            "children": [{
                "code": "610502001",
                "name": "杜桥街道"
            }, {
                "code": "610502002",
                "name": "人民街道"
            }, {
                "code": "610502003",
                "name": "解放街道"
            }, {
                "code": "610502004",
                "name": "向阳街道"
            }, {
                "code": "610502005",
                "name": "站南街道"
            }, {
                "code": "610502006",
                "name": "双王街道"
            }, {
                "code": "610502007",
                "name": "良田街道"
            }, {
                "code": "610502008",
                "name": "崇业路街道"
            }, {
                "code": "610502100",
                "name": "桥南镇"
            }, {
                "code": "610502101",
                "name": "阳郭镇"
            }, {
                "code": "610502102",
                "name": "故市镇"
            }, {
                "code": "610502103",
                "name": "下邽镇"
            }, {
                "code": "610502104",
                "name": "三张镇"
            }, {
                "code": "610502105",
                "name": "交斜镇"
            }, {
                "code": "610502106",
                "name": "辛市镇"
            }, {
                "code": "610502107",
                "name": "崇宁镇"
            }, {
                "code": "610502108",
                "name": "孝义镇"
            }, {
                "code": "610502109",
                "name": "吝店镇"
            }, {
                "code": "610502111",
                "name": "官底镇"
            }, {
                "code": "610502112",
                "name": "官路镇"
            }, {
                "code": "610502113",
                "name": "丰原镇"
            }, {
                "code": "610502114",
                "name": "阎村镇"
            }, {
                "code": "610502115",
                "name": "龙背镇"
            }, {
                "code": "610502116",
                "name": "官道镇"
            }]
        }, {
            "code": "610503",
            "name": "华州区",
            "children": [{
                "code": "610503001",
                "name": "华州街道"
            }, {
                "code": "610503101",
                "name": "杏林镇"
            }, {
                "code": "610503102",
                "name": "赤水镇"
            }, {
                "code": "610503103",
                "name": "高塘镇"
            }, {
                "code": "610503104",
                "name": "大明镇"
            }, {
                "code": "610503105",
                "name": "瓜坡镇"
            }, {
                "code": "610503106",
                "name": "莲花寺镇"
            }, {
                "code": "610503107",
                "name": "柳枝镇"
            }, {
                "code": "610503108",
                "name": "下庙镇"
            }, {
                "code": "610503109",
                "name": "金堆镇"
            }]
        }, {
            "code": "610522",
            "name": "潼关县",
            "children": [{
                "code": "610522001",
                "name": "城关街道"
            }, {
                "code": "610522101",
                "name": "秦东镇"
            }, {
                "code": "610522102",
                "name": "太要镇"
            }, {
                "code": "610522103",
                "name": "桐峪镇"
            }, {
                "code": "610522104",
                "name": "代字营镇"
            }]
        }, {
            "code": "610523",
            "name": "大荔县",
            "children": [{
                "code": "610523001",
                "name": "城关街道"
            }, {
                "code": "610523101",
                "name": "许庄镇"
            }, {
                "code": "610523102",
                "name": "朝邑镇"
            }, {
                "code": "610523103",
                "name": "安仁镇"
            }, {
                "code": "610523104",
                "name": "两宜镇"
            }, {
                "code": "610523105",
                "name": "羌白镇"
            }, {
                "code": "610523106",
                "name": "官池镇"
            }, {
                "code": "610523107",
                "name": "冯村镇"
            }, {
                "code": "610523108",
                "name": "双泉镇"
            }, {
                "code": "610523110",
                "name": "下寨镇"
            }, {
                "code": "610523111",
                "name": "韦林镇"
            }, {
                "code": "610523112",
                "name": "范家镇"
            }, {
                "code": "610523113",
                "name": "苏村镇"
            }, {
                "code": "610523114",
                "name": "赵渡镇"
            }, {
                "code": "610523116",
                "name": "埝桥镇"
            }, {
                "code": "610523117",
                "name": "段家镇"
            }, {
                "code": "610523400",
                "name": "国营陕西荔北企业公司"
            }, {
                "code": "610523401",
                "name": "国营陕西沙苑企业公司"
            }, {
                "code": "610523402",
                "name": "国营陕西黄河企业公司"
            }]
        }, {
            "code": "610524",
            "name": "合阳县",
            "children": [{
                "code": "610524001",
                "name": "城关街道"
            }, {
                "code": "610524101",
                "name": "甘井镇"
            }, {
                "code": "610524102",
                "name": "坊镇"
            }, {
                "code": "610524103",
                "name": "洽川镇"
            }, {
                "code": "610524104",
                "name": "新池镇"
            }, {
                "code": "610524105",
                "name": "黑池镇"
            }, {
                "code": "610524106",
                "name": "路井镇"
            }, {
                "code": "610524107",
                "name": "和家庄镇"
            }, {
                "code": "610524108",
                "name": "王村镇"
            }, {
                "code": "610524110",
                "name": "同家庄镇"
            }, {
                "code": "610524111",
                "name": "百良镇"
            }, {
                "code": "610524112",
                "name": "金峪镇"
            }]
        }, {
            "code": "610525",
            "name": "澄城县",
            "children": [{
                "code": "610525001",
                "name": "城关街道"
            }, {
                "code": "610525101",
                "name": "冯原镇"
            }, {
                "code": "610525102",
                "name": "王庄镇"
            }, {
                "code": "610525103",
                "name": "尧头镇"
            }, {
                "code": "610525104",
                "name": "赵庄镇"
            }, {
                "code": "610525105",
                "name": "交道镇"
            }, {
                "code": "610525106",
                "name": "寺前镇"
            }, {
                "code": "610525107",
                "name": "韦庄镇"
            }, {
                "code": "610525108",
                "name": "安里镇"
            }, {
                "code": "610525109",
                "name": "庄头镇"
            }]
        }, {
            "code": "610526",
            "name": "蒲城县",
            "children": [{
                "code": "610526001",
                "name": "城关街道"
            }, {
                "code": "610526101",
                "name": "罕井镇"
            }, {
                "code": "610526102",
                "name": "孙镇"
            }, {
                "code": "610526103",
                "name": "兴镇"
            }, {
                "code": "610526104",
                "name": "党睦镇"
            }, {
                "code": "610526105",
                "name": "高阳镇"
            }, {
                "code": "610526106",
                "name": "永丰镇"
            }, {
                "code": "610526107",
                "name": "荆姚镇"
            }, {
                "code": "610526108",
                "name": "苏坊镇"
            }, {
                "code": "610526109",
                "name": "龙阳镇"
            }, {
                "code": "610526112",
                "name": "洛滨镇"
            }, {
                "code": "610526113",
                "name": "陈庄镇"
            }, {
                "code": "610526114",
                "name": "桥陵镇"
            }, {
                "code": "610526116",
                "name": "尧山镇"
            }, {
                "code": "610526117",
                "name": "椿林镇"
            }, {
                "code": "610526118",
                "name": "龙池镇"
            }]
        }, {
            "code": "610527",
            "name": "白水县",
            "children": [{
                "code": "610527001",
                "name": "城关街道"
            }, {
                "code": "610527102",
                "name": "尧禾镇"
            }, {
                "code": "610527103",
                "name": "杜康镇"
            }, {
                "code": "610527104",
                "name": "西固镇"
            }, {
                "code": "610527105",
                "name": "林皋镇"
            }, {
                "code": "610527106",
                "name": "史官镇"
            }, {
                "code": "610527107",
                "name": "北塬镇"
            }, {
                "code": "610527109",
                "name": "雷牙镇"
            }]
        }, {
            "code": "610528",
            "name": "富平县",
            "children": [{
                "code": "610528001",
                "name": "城关街道"
            }, {
                "code": "610528101",
                "name": "庄里镇"
            }, {
                "code": "610528102",
                "name": "张桥镇"
            }, {
                "code": "610528103",
                "name": "美原镇"
            }, {
                "code": "610528104",
                "name": "流曲镇"
            }, {
                "code": "610528105",
                "name": "淡村镇"
            }, {
                "code": "610528107",
                "name": "留古镇"
            }, {
                "code": "610528108",
                "name": "老庙镇"
            }, {
                "code": "610528109",
                "name": "薛镇"
            }, {
                "code": "610528110",
                "name": "到贤镇"
            }, {
                "code": "610528111",
                "name": "曹村镇"
            }, {
                "code": "610528112",
                "name": "宫里镇"
            }, {
                "code": "610528113",
                "name": "梅家坪镇"
            }, {
                "code": "610528114",
                "name": "刘集镇"
            }, {
                "code": "610528115",
                "name": "齐村镇"
            }]
        }, {
            "code": "610582",
            "name": "华阴市",
            "children": [{
                "code": "610582001",
                "name": "太华路街道"
            }, {
                "code": "610582002",
                "name": "岳庙街道"
            }, {
                "code": "610582100",
                "name": "孟塬镇"
            }, {
                "code": "610582103",
                "name": "华西镇"
            }, {
                "code": "610582104",
                "name": "罗敷镇"
            }, {
                "code": "610582105",
                "name": "华山镇"
            }, {
                "code": "610582400",
                "name": "国营陕西华山企业公司"
            }]
        }, {
            "code": "610581",
            "name": "韩城市",
            "children": [{
                "code": "610581001",
                "name": "新城街道"
            }, {
                "code": "610581002",
                "name": "金城街道"
            }, {
                "code": "610581100",
                "name": "龙门镇"
            }, {
                "code": "610581101",
                "name": "桑树坪镇"
            }, {
                "code": "610581103",
                "name": "芝川镇"
            }, {
                "code": "610581104",
                "name": "西庄镇"
            }, {
                "code": "610581106",
                "name": "芝阳镇"
            }, {
                "code": "610581107",
                "name": "板桥镇"
            }]
        }]
	}]

var cityPicker = {
    data: [],
    curProvince: [],
    curCity: [],
    curArea: [],
    curStreet: []
};

/*window.onload = function() {
    var oProvince = getId('province')
    // 初始化省级数据
    initProvince(oProvince, data);
};*/
/**
* 加载城市数据
* @param 当前点击的省份
*/
/*$("#province").change(function(){
	
    // 选中索引
    var index = this.selectedIndex;
    // 选中文本
    var text = this.options[index].text;
    // 选中值
    var value = this.options[index].value;
    cityPicker.curProvince = data[index - 1];
    
    $.each(data,function(i,item){
		console.log(item);
	});
    debugger;
    setCity(data, index);
})*/

function showProvince(name){
	$.each(data,function(i,item){
		if(item.name==name){
			cityPicker.curCity = data[i].children;
		}
	});
};
/**
* 设置城市下拉列表
* @param {Array} data 城市数据
* @param {Number} index 当前点击的省份的索引
*/
/*function setCity( data, index) {
    var city = getId('city');
    city.innerHTML = '';
    var first = document.createElement("option");
    first.innerHTML = "=请选择区县=";
    city.appendChild(first);
    var children = data[index].children;

    children.forEach(function(item, index) {
        var op = document.createElement('option');
        op.innerHTML = item.name;
        op.value = item.code
        city.appendChild(op)
    })
    cityPicker.curCity = children;
}*/
/**
* 加载县级数据
* @param 当前点击的城市
*/
/*$("#city").change(function(){
    // 选中索引
    var index = this.selectedIndex;
    // 选中文本
    var text = this.options[index].text;
    // 选中值
    var value = this.options[index].value;
    cityPicker.curArea = cityPicker.curCity[index - 1].children;
    setArea(cityPicker.curArea, index);
})*/

function showArea(name){
	$.each(cityPicker.curCity,function(i,item){
		if(item.name==name){
			setArea(item.children,i);
		}
	});
}

/**
* 设置县级下拉列表
* @param {Array} data 城市数据
* @param {Number} index 当前点击的城市的索引
*/
function setArea(data,i) {
    var area = getId('area')
    area.innerHTML = "";
    var first = document.createElement("option");
    first.innerHTML = "=请选择乡镇、街道=";
    area.appendChild(first);
    data.forEach(function(item,i) {
        var op = document.createElement("option");
        op.innerHTML = item.name;
        op.value = item.code;
        area.appendChild(op);
    });
}
/**
* 加载乡级数据
* @param 当前点击的县
*/
/*$("#area").change(function(){
	debugger;
    // 选中索引
    var index = this.selectedIndex;
    // 选中文本
    var text = this.options[index].text;
    // 选中值
    var value = this.options[index].value;
    cityPicker.curStreet = cityPicker.curArea[index - 1].children;
    setStreet(cityPicker.curStreet, index);
})

function setStreet(data, index) {
    var street = getId("street");
    street.innerHTML = "";
    var first = document.createElement("option");
    first.innerHTML = "=请选择乡镇、街道=";
    street.appendChild(first);
    data.forEach(function(item, index) {
        var op = document.createElement("option");
        op.innerHTML = item.name;
        op.value = item.code;
        street.appendChild(op);
    });
}*/

/**
 * 初始化省级下拉选项框
 * 
 * @param {Object} target 省级下拉选择框
 * @param {Array} data 所有的城市数据
 */
/*function initProvince(target, data) {
    target.innerHTML = ''
    var first = document.createElement("option");
    first.innerHTML = "=请选择城市=";
    target.appendChild(first);
    data.forEach(function(item, index) {
        var op = document.createElement('option')
        op.innerHTML = item.name;
        op.value = item.code
        target.appendChild(op);
    });
}*/
/**
 * 根据id获取DOM元素
 * @param {String} id DOM元素的id
 * @return {Object} DOM对象
 */
function getId(id) {
    return document.getElementById(id)
}


var cityPicker2 = {
	    data: [],
	    curProvince: [],
	    curCity: [],
	    curArea: [],
	    curStreet: []
};

function showProvince2(name){
	$.each(data,function(i,item){
		if(item.name==name){
			setCity2(data, i);
		}
	});
}


/**
* 设置城市下拉列表
* @param {Array} data 城市数据
* @param {Number} index 当前点击的省份的索引
*/
function setCity2( data, index) {
    var city = getId('city2');
    city.innerHTML = '';
    var first = document.createElement("option");
    first.innerHTML = "=请选择区县=";
    city.appendChild(first);
    var children = data[index].children;

    children.forEach(function(item, index) {
        var op = document.createElement('option');
        op.innerHTML = item.name;
        op.value = item.code
        city.appendChild(op)
    })
    cityPicker2.curCity = children;
}
/**
* 加载县级数据
* @param 当前点击的城市
*/
$("#city2").change(function(){
    // 选中索引
    var index = this.selectedIndex;
    // 选中文本
    var text = this.options[index].text;
    // 选中值
    var value = this.options[index].value;
    cityPicker2.curArea = cityPicker2.curCity[index - 1].children;
    setArea2(cityPicker2.curArea, index);
})
/**
* 设置县级下拉列表
* @param {Array} data 城市数据
* @param {Number} index 当前点击的城市的索引
*/
function setArea2(data, index) {
    var area = getId('area2')
    area.innerHTML = "";
    var first = document.createElement("option");
    first.innerHTML = "=请选择乡镇、街道=";
    area.appendChild(first);
    data.forEach(function(item, index) {
        var op = document.createElement("option");
        op.innerHTML = item.name;
        op.value = item.code;
        area.appendChild(op);
    });
}